﻿using Inventory.API.Application.Command.StoragelocationmanagementCommand;
using Inventory.API.Application.Command.WarehouseManagementCommand;
using Inventory.API.DTO.WarehousemanagementDTO;
using Inventory.Domain;
using Inventory.Errorcode;
using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using static Microsoft.EntityFrameworkCore.DbLoggerCategory;

namespace Inventory.API.Controllers
{
    /// <summary>
    /// 库位管理
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class StoragelocationmanagementController : ControllerBase
    {



        private  readonly IMediator _mediator;

        public StoragelocationmanagementController(IMediator mediator)
        {
            _mediator = mediator;
        }
        /// <summary>
        /// 新增库位
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<ApiResult> AddStoragelocationmanagement(AddStoragelocationmanagementCommand command)
        {
            return await _mediator.Send(command);
        }
        ///// <summary>
        ///// 显示库位列表
        ///// </summary>
        ///// <param name="command"></param>
        ///// <returns></returns>
        //[HttpGet]
        //public async Task<ApiResult> GetStoragelocationmanagementListQuery([FromQuery] GetStoragelocationmanagementListQueryCommand command)
        //{
        //    return await _mediator.Send(command);
        //}


        ///// <summary>
        ///// 删除库位
        ///// </summary>
        ///// <param name="command"></param>
        ///// <returns></returns>
        //[HttpDelete]
        //public async Task<ApiResult> DeleteStoragelocationmanagement([FromQuery] DeleteStoragelocationmanagementCommand command)
        //{
        //    return await _mediator.Send(command);
        //}

        ///// <summary>
        ///// 显示库位详情
        ///// </summary>
        ///// <param name="query"></param>
        ///// <returns></returns>
        //[HttpGet]
        //public async Task<ApiResult<Warehousemanagement>> GetStoragelocationmanagementInfo([FromQuery] GetStoragelocationmanagementInfoCommand query)
        //{
        //    return await _mediator.Send(query);
        //}
        ///// <summary>
        ///// 更新库位
        ///// </summary>
        ///// <param name="command"></param>
        ///// <returns></returns>
        //[HttpPut]
        //public async Task<ApiResult> UpdateStoragelocationmanagement(UpdateStoragelocationmanagementCommand command)
        //{
        //    return await _mediator.Send(command);
        //}
        ///// <summary>
        ///// 显示库位所有信息
        ///// </summary>
        ///// <param name="command"></param>
        ///// <returns></returns>
        //[HttpGet]
        //public async Task<ApiResult<IList<WarehousemanagementDTOS>>> GetAllStoragelocationmanagementList([FromQuery] GetAllStoragelocationmanagementListQueryCommand command)
        //{
        //    return await _mediator.Send(command);


        //}

    }
}
